package org.ainlolcat.ainscience2.model.filter.impl;

import org.ainlolcat.ainscience2.model.data.Column;
import org.ainlolcat.ainscience2.model.filter.Filter;

/**
 * Created by IntelliJ IDEA.
 * User: ain
 * Date: 17.06.12
 * Time: 1:20
 * To change this template use File | Settings | File Templates.
 */
public class ColumnNameFilter implements Filter {

    String name;

    public ColumnNameFilter(String name) {
        this.name = name;
    }

    public boolean isValid(Object column) {
        if (column instanceof Column){
            return ((Column)column).getName().equals(name);
        } else{
            return false;
        }
    }
}
